/*
 * @Author: WangRui
 * @Date: 2019-12-07 12:13:55
 * @LastEditors: WangRui
 * @LastEditTime: 2019-12-07 14:41:53
 * @Description: 创建store, redux-thunk实现action中发送异步请求
 */
import { createStore, compose, applyMiddleware } from 'redux'
import thunk from 'redux-thunk'
import reducer from './reducer'

//配置redux-dev-tools
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;


const store = createStore(reducer, composeEnhancers(
    applyMiddleware(thunk)
))

export default store